package com.lening.iot.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.iot.dto.AccontrolDTO;
import com.lening.iot.dto.MonmangerDTO;
import com.lening.iot.po.MonmangerPO;
import com.lening.iot.service.MonmangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:59
 */
@RestController
@RequestMapping("/monmangers")
public class MonmangerController extends BaseController<MonmangerPO, MonmangerDTO, MonmangerService> {
    @Autowired(required = false)
    private WebClient webClient;

    @Autowired
    private MonmangerService monmangerService;
    @GetMapping("/getAllMmg")
    public Page<MonmangerDTO> getAllAcl(Page<MonmangerDTO> monmangerDTOPage){
        Page<MonmangerDTO> mmgList = monmangerService.getAllMmg(monmangerDTOPage);
        return mmgList;
    }
//
//    @Override
//    public Page<?> page(MonmangerDTO monmangerDTO) {
//        return monmangerService.getAllMmg(monmangerDTO);
//    }
@GetMapping("/getAll")
public List<MonmangerDTO> getAll(String communityName) {
return monmangerService.getAll(communityName);
}
}
